<?php
/**
 * Created by PhpStorm.
 * User: reshared
 * Date: 2017/9/29
 * Time: 上午11:02
 */

namespace Index\Event;


class UserEvent extends BaseEvent
{
    protected $userModel;

    public function __construct()
    {
        $this->userModel = M('user');
    }

    public function login($uid)
    {
        $this->userModel->where('user_id = '.$uid)->save(['last_login_time'=>time()]);
    }
}